import { getShopCartListApi } from "@/api/shopCart";

export default {
  state: {
    shopCartList: [],
  },
  mutations: {
    UPDATESHOPCARTLIST(state, shopCartList) {
      state.shopCartList = shopCartList;
    },
  },
  actions: {
    async getShopCartList({ commit }) {
      const res = await getShopCartListApi();
      console.log(res);
      commit("UPDATESHOPCARTLIST", res);
    },
  },
};
